<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>
    {%if is_dev%}
      (DEV)
    {%endif%}
    {%block title%}
      {%if link%}Link {{link.key.id}}: {{link.url}} -{%endif%}
    {%endblock%}
    Links
  </title>
  <link rel="icon" href="{{media_url}}favicon.ico" />
  <script type="text/javascript" src="{{media_url}}script.js"></script>

  <!-- head block to insert js/css for forms processing -->
  {%block head%}{%endblock%}
  <!-- /head -->
</head>

<div align="right">
{%if is_dev%}
<div style="float:left; color:green; font-weight:bold">DEVELOPMENT SERVER</div>
{%else%}
<div style="float:left; font-weight:bold">Links Application</div>
{%endif%}

{%if user%}
<b>{{user.email}} ({{user.nickname}})</b>
{%endif%}

{%if user%}
<a class="novisit" href="{{sign_out}}">Sign out</a>
{% else %}
<a class="novisit" href="{{sign_in}}">Sign in</a>
{%endif%}
</div>

<div class="mainmenu">
  {%block mainmenu%}
  <a href="{%url app.views.index %}">Links</a>
  <a href="{%url app.views.browse %}">Browse</a>
  <a href="{%url app.views.search%}">Search</a>
  {%endblock%}
</div>
<div class="mainmenu2">
  {%block mainmenu2%}{%endblock%}
</div>

<body>
<div>
{%block body%}{%endblock%}
</div>
</body>
</html>
